<!-- To display "Current Bets" tab -->
<% unless params[:page] %>

<% content_for :side do %>

<div class="current-streak clear">
	<% if current_user.prize.nil? %>
		Select a prize:
		<% else %>
		<%= render :partial=>"winstreaks/remain",:locals=>{:user=>current_user} %>
	<% end %>
	<div class="change-prize"><%= link_to_function "Change Prize","showSelectPrizeForm()" %></div>
	<br/>
</div>

<% end %>

<% form_tag select_prizes_path,:id=>"select-prize-form",:method=>:put,:style=>"display:none"  do %>
<%= hidden_field_tag "id","",:id=>"selected-prize-id" %>
<%= render :partial=>"prizes/prizes" %>
<% end %>
<% end %>
<%= render :partial=>"last_winstreak" %>
<%= render :partial=>"friends_bet/challenge" %>

<%if current_user.bought_win?%>
	<%= render :partial=>"next_streak"%>
<%end%>
<%= render :partial=>"bets",:locals=>{:bets=>@bets} %>
<%= render :partial=>"rules" %>

<fb:js-string var="welcome_dialog"> 
	<br />
	Did you know that you can challenge your friends on a bet?  Give it a try!		
	<br /> <br />
</fb:js-string> 

<% if !current_user.hide_howto? && (@bets.last != nil) %>

<script language="javascript">
 var friendBetExpId = "friends_bet_expander_"+<%= @bets.last.match_id%>;
  console.log(friendBetExpId);

	var dialog = new Dialog(Dialog.DIALOG_CONTEXTUAL).setContext(document.getElementById(friendBetExpId)).showMessage(' ', welcome_dialog,button_confirm = 'Okay').setStyle({background: '#fff'}); 
	
	dialog.onconfirm = function() { 
		<% @controller.hide_howto %>
	}; 

</script>
<% end%>